﻿using System;

namespace Task1
{
    class Program
    {
        static bool Prime(int num)
        {
            if (num < 2)
                return false;
            else for (int i = 2; i <= Math.Sqrt(num); i++)
                    if (num % i == 0) return false;
            return true;
        }
        static void Main(string[] args)
        {
            Console.WriteLine("input an integer to output all its Prime factor:");
            int num = int.Parse(Console.ReadLine());
            for (int i = 2; i <= num; i++)
            {
                if (num % i == 0 && Prime(i))
                    Console.Write($"{i} ");
            }
            Console.WriteLine();
        }
    }
}